package com.zjy.software.day7.mvc.dao.impl;

import com.zjy.software.day7.mvc.bean.Pc;
import com.zjy.software.day7.mvc.dao.PcDao;

public class PcDaoImpl implements PcDao {
    private static  Pc[] pcs=new Pc[100];
    private static int index=0;
    @Override
    public void addPc(Pc pc) {
        System.out.println("PcDaoImpl.addPc");
        pcs[index++]=pc;
        System.out.println("新增了第"+index+"个pc");
    }

    @Override
    public void deletePc(int id) {

    }

    @Override
    public void updatePc(Pc pc) {

    }

    @Override
    public Pc[] getAllPc() {
        return pcs;
    }
}
